package cn.lb.framework.poi.excel.entity;

import cn.lb.framework.poi.handler.inter.IExcelVerifyHandler;

/**
 * 导入参数设置
 */
public class ImportParams extends ExcelBaseParams {
    /**
     * 表格标题行数,默认0
     */
    private int titleRows = 0;
    /**
     * 表头行数,默认1
     */
    private int headRows = 1;
    /**
     * 字段真正值和列标题之间的距离 默认0
     */
    private int startRows = 0;
    /**
     * 主键设置,如何这个cell没有值,就跳过 或者认为这个是list的下面的值
     */
    private Integer keyIndex = 0;
    /**
     * 开始读取的sheet位置,默认为0
     */
    private int startSheetIndex = 0;
    /**
     * 上传表格需要读取的sheet 数量,默认为1
     */
    private int sheetNum = 1;
    /**
     * 是否需要保存上传的Excel,默认为false
     */
    private boolean needSave = false;
    /**
     * 是否需要校验上传的Excel,默认为false
     */
    private boolean needVerfiy = false;
    /**
     * 保存上传的Excel目录,默认是 如 TestEntity这个类保存路径就是
     * upload/excelUpload/Test/yyyyMMddHHmss_***** 保存名称上传时间_五位随机数
     */
    private String saveUrl = "upload/excelUpload";
    /**
     * 校验处理接口
     */
    private IExcelVerifyHandler verifyHanlder;
    /**
     * 最后的无效行数
     */
    private int lastOfInvalidRow = 0;
    /**
     * 导入时校验数据模板,是不是正确的Excel
     */
    private String[] importFields;

    public int getTitleRows() {
        return titleRows;
    }

    public void setTitleRows(int titleRows) {
        this.titleRows = titleRows;
    }

    public int getHeadRows() {
        return headRows;
    }

    public void setHeadRows(int headRows) {
        this.headRows = headRows;
    }

    public int getStartRows() {
        return startRows;
    }

    public void setStartRows(int startRows) {
        this.startRows = startRows;
    }

    public Integer getKeyIndex() {
        return keyIndex;
    }

    public void setKeyIndex(Integer keyIndex) {
        this.keyIndex = keyIndex;
    }

    public int getStartSheetIndex() {
        return startSheetIndex;
    }

    public void setStartSheetIndex(int startSheetIndex) {
        this.startSheetIndex = startSheetIndex;
    }

    public int getSheetNum() {
        return sheetNum;
    }

    public void setSheetNum(int sheetNum) {
        this.sheetNum = sheetNum;
    }

    public boolean isNeedSave() {
        return needSave;
    }

    public void setNeedSave(boolean needSave) {
        this.needSave = needSave;
    }

    public boolean isNeedVerfiy() {
        return needVerfiy;
    }

    public void setNeedVerfiy(boolean needVerfiy) {
        this.needVerfiy = needVerfiy;
    }

    public String getSaveUrl() {
        return saveUrl;
    }

    public void setSaveUrl(String saveUrl) {
        this.saveUrl = saveUrl;
    }

    public IExcelVerifyHandler getVerifyHanlder() {
        return verifyHanlder;
    }

    public void setVerifyHanlder(IExcelVerifyHandler verifyHanlder) {
        this.verifyHanlder = verifyHanlder;
    }

    public int getLastOfInvalidRow() {
        return lastOfInvalidRow;
    }

    public void setLastOfInvalidRow(int lastOfInvalidRow) {
        this.lastOfInvalidRow = lastOfInvalidRow;
    }

    public String[] getImportFields() {
        return importFields;
    }

    public void setImportFields(String[] importFields) {
        this.importFields = importFields;
    }
}
